<?php
/*
* Copyright (c) 2010 by Cediti
*
* You may distribute under the terms of either the GNU Lesser General
* Public License or the new BSD License, as specified in the README file.
*/
// created :	18 March 2010
// version :	18 March 2010

/**
 * Indicates the types of queries that the Repository has the ability to fulfill. Query support levels are :
 *  none: No queries of any kind can be fulfilled.
 *  metadataonly: Only queries that filter based on object properties can be fulfilled. Specifically, the CONTAINS() predicate function is not supported.
 *  fulltextonly: Only queries that filter based on the full-text content of documents can be fulfilled. Specifically, only the CONTAINS() predicate function can be included in the WHERE clause.
 *  bothseparate: The repository can fulfill queries that filter EITHER on the full-text content of documents OR on their properties, but NOT if both types of filters are included in the same query.
 *  bothcombined: The repository can fulfill queries that filter on both the full-text content of documents and their properties in the same query.
 *
 */
class Cmis_Repository_Capability_Query extends Cmis_Repository_Capability_Abstract
{
	const VALUE_NONE = 'none';
	const VALUE_METADATAONLY = 'metadataonly';
	const VALUE_FULLTEXTONLY = 'fulltextonly';
	const VALUE_BOTHSEPARATE = 'bothseparate';
	const VALUE_BOTHCOMBINED = 'bothcombined';

	protected function _setValue($value)
	{
		$this->_value = trim($value);
		switch ($this->_value)
		{
			case self::VALUE_METADATAONLY :
			case self::VALUE_NONE :
			case self::VALUE_FULLTEXTONLY :
			case self::VALUE_BOTHCOMBINED :
			case self::VALUE_BOTHSEPARATE :
				break;
			default:
				$this->_value = self::VALUE_NONE;
		}
	}
}

# EOF
